package com.yztc.youbadbad.utils;

import android.content.Context;
import android.content.Intent;
import android.os.Parcelable;

import com.yztc.youbadbad.bean.homepage.ProductBean;
import com.yztc.youbadbad.constant.MyConstants;
import com.yztc.youbadbad.ui.other.MainActivity;
import com.yztc.youbadbad.ui.other.activity.CommodityInfoActivity;

/**
 * Created by wanggang on 2016/11/14.
 */

public class UIManager {

    //打开界面  路由界面
    public static void startMain(Context context,
                                 int code){
        Intent intent=new Intent();
        intent.setClass(context,MainActivity.class);
        intent.putExtra("page",code);
        context.startActivity(intent);
    }

    //商品详情画面
    public static void startProduct_DetialInfo(Context context,
                                 ProductBean productBean){
        Intent intent = new Intent(context, CommodityInfoActivity.class);
        intent.putExtra(MyConstants.KEY_PRODUCET_DETAIL, (Parcelable) productBean);
        context.startActivity(intent);
    }


}
